package com.fm.webrtc.websocket.message.request;

import com.fm.webrtc.websocket.message.Base;
import com.fm.webrtc.websocket.message.transport.DtlsParameters;

public class ConnectWebrtcTransport extends Base {
    public boolean isConsumer;
    public String transportId;
    public DtlsParameters dtlsParameters;

    @Override
    public String toString() {
        return "ConnectWebrtcTransport{" +
                "consume=" + isConsumer +
                ", transportId='" + transportId + '\'' +
                ", dtlsParameters=" + dtlsParameters +
                '}';
    }

    public ConnectWebrtcTransport() {
    }

    public ConnectWebrtcTransport(Builder builder) {
        this.isConsumer = builder.consume;
        this.transportId = builder.transportId;
        this.dtlsParameters = builder.dtlsParameters;
    }

    public static class Builder {

        private boolean consume;
        private String transportId;
        private DtlsParameters dtlsParameters;

        public Builder setConsume(boolean consume) {
            this.consume = consume;
            return this;
        }

        public Builder setTransportId(String transportId) {
            this.transportId = transportId;
            return this;
        }

        public Builder setDtlsParameters(DtlsParameters dtlsParameters) {
            this.dtlsParameters = dtlsParameters;
            return this;
        }


        public ConnectWebrtcTransport build() {
            return new ConnectWebrtcTransport(this);
        }
    }
}
